Re: populating arrays with default values
От | Kenneth Porter |
---|---|
Тема | Re: populating arrays with default values |
Дата | |
Msg-id | 8AA8868C46F72EEB0E94FB36@[10.169.6.155] обсуждение исходный текст |
Ответ на | populating arrays with default values ("G. J. Walsh" <gjwalsh@dscdirectionalservices.com>) |
Ответы |
Re: populating arrays with default values
|
Список | pgsql-novice |
On Wednesday, November 14, 2007 12:09 PM -0800 "G. J. Walsh" <gjwalsh@dscdirectionalservices.com> wrote: > I come from a long background with C and isam. Moving into php and > postgresql is therefore not all that strange, but I suffer with the > comparative lack of structure at times. Same here. I'm a power C++ guy but relatively new at SQL. I can read it but not yet write it fluently. > I deal with a lot of psych scoring and am establishing tables which will > contain the response patterns for each individual test within a battery. > In defining this, I plan on something like: ans CHAR(1) ARRAY[192] > > But I learned that PostgreSQL does not 'enforce' this. I would rather > have an '?' placed in each of the 192 array elements (and thereby > constrain with NOT NULL) to indicate lack of a response (the default) > when the test records are first established for the client. Instead of a char, could you use an enumeration? Are there in fact 256 distinct answers for each array position? (I'm not certain that SQL, or the PostgreSQL dialect, have such a thing.)
В списке pgsql-novice по дате отправления: